package com.todo.event.activity.infrastructure.mapper;

import com.todo.event.activity.infrastructure.entity.po.EventActivityRecordPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/1/15 13:47
 * @description
 */
@Mapper
public interface EventActivityRecordMapper {

    int insertEventActivityRecord(EventActivityRecordPO eventActivityPO);

    int updateActivityRecordStatus(@Param("id") Long id, @Param("oldStatus") Integer oldStatus, @Param("newStatus") Integer newStatus);

    EventActivityRecordPO queryRecordByUK(@Param("activityId") Long activityId, @Param("uk") String uk);

    List<Long> queryStatusRecordIdListByTime(@Param("status") Integer status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<EventActivityRecordPO> queryRecordListByIdList(@Param("idList") List<Long> idList);

    int updateActivityRecordBaseInfo(@Param("id") Long id, @Param("retryCount") Integer retryCount, @Param("status") Integer status);
}
